home *** CD-ROM | disk | FTP | other *** search
/ Quick PC 62 / Quick PC 62.iso / I386 / IIS5_01.CAB / IIS_iimltils.asp < prev    next >
Encoding:
Text File  |  1999-06-03  |  4.7 KB  |  146 lines

  1. <%@ LANGUAGE = VBScript %>
  2. <% Option Explicit %>
  3. <!-- #include file="directives.inc" -->
  4.  
  5. <!--#include file="iimlti.str"-->
  6. <!--#include file="iimltils.str"-->
  7. <!--#include file="iisetfnt.inc"-->
  8.  
  9. <%
  10. dim TotalWidth
  11. TotalWidth = L_IPADDRESSCOLWIDTH_NUM + L_IPPORTCOLWIDTH_NUM + L_SSLPORTCOLWIDTH_NUM + L_HOSTCOLWIDTH_NUM
  12. %>
  13. <HTML>
  14. <HEAD>
  15.     <TITLE></TITLE>
  16.  
  17.     <SCRIPT LANGUAGE="JavaScript">
  18.     
  19.     <!--#include file="iijsfuncs.inc"-->
  20.  
  21.     function chgStatus(sel){
  22.         parent.head.listFunc.sel=sel;
  23.         self.location.href="iimltils.asp";
  24.     }
  25.  
  26.     function SetUpdated(){
  27.  
  28.         if (parent.head.listFunc.noupdate){
  29.             parent.head.listFunc.noupdate = false;
  30.         }
  31.         else{
  32.             i=parent.head.listFunc.sel;
  33.             reSort = setVals(parent.head.cachedList[i],"ipaddress",document.listform.editMe);
  34.             reSort = reSort || setVals(parent.head.cachedList[i],"ipport",document.listform.ipport);
  35.             reSort = reSort || setVals(parent.head.cachedList[i],"sslport",document.listform.sslport);
  36.             reSort = reSort || setVals(parent.head.cachedList[i],"host",document.listform.host);
  37.             
  38.             parent.head.cachedList[i].updated=true;
  39.             if (reSort){
  40.                 parent.head.listFunc.reSort();
  41.             }
  42.         }
  43.     }
  44.     
  45.     
  46.     function setVals(cachedItem, propName, formCntrl){
  47.         if (cachedItem[propName] != formCntrl.value){
  48.             cachedItem[propName] = formCntrl.value;
  49.             return (parent.head.listFunc.sortby == propName);
  50.         }        
  51.         else{
  52.             return false;
  53.         }
  54.     }
  55.     function SetSecure(item,formCntrl,isSecure)
  56.     {
  57.         if (formCntrl.value != "")
  58.         {
  59.             parent.head.cachedList[item].isSecure = isSecure;
  60.         }
  61.         return true;
  62.     }
  63.     
  64.     </SCRIPT>
  65. </HEAD>
  66.  
  67. <BODY BGCOLOR="#FFFFFF" LEFTMARGIN=0 TOPMARGIN=0>
  68.  
  69. <FORM NAME="listform">
  70. <SCRIPT LANGUAGE="JavaScript">
  71.  
  72.     editOK=false;
  73.     writeSecHdr = true;
  74.     writeHdr = true;    
  75.     sel=eval(parent.head.listFunc.sel);    
  76.     list = writeList();
  77.     writeLine(list);
  78.  
  79. function writeList(){    
  80.     writestr = "<TABLE WIDTH = <%= TotalWidth %> BORDER=0 CELLSPACING=0 CELLPADDING=4 >";
  81.     for (var i=0;i < parent.head.cachedList.length; i++) {
  82.     
  83.         if (parent.head.cachedList[i].sslport != ""){
  84.             if (writeSecHdr){
  85.                 writestr += "<TR>"
  86.                 writestr += parent.head.listFunc.writeCol(4,<%= TotalWidth %>," ","");
  87.                 writestr += "</TR>";                    
  88.                 writestr += "<TR BGCOLOR=<%= Session("BGCOLOR") %>>"
  89.                 writestr += parent.head.listFunc.writeCol(4,<%= TotalWidth %>,"<B><%= L_SECURE_TEXT %></B>","");
  90.                 writestr += "</TR>";
  91.                 writeSecHdr = false;
  92.             }
  93.         }
  94.         else{
  95.             if (writeHdr){        
  96.                 writestr += "<TR BGCOLOR=<%= Session("BGCOLOR") %>>"
  97.                 writestr += parent.head.listFunc.writeCol(4,<%= TotalWidth %>,"<B><%= L_SERVER_TEXT %></B>","");
  98.                 writestr += "</TR>";
  99.                 writeHdr = false;
  100.             }            
  101.         }
  102.  
  103.  
  104.         if (parent.head.listFunc.sel !=i) {
  105.             if (parent.head.cachedList[i].deleted){
  106.             }
  107.             else{
  108.             
  109.                         writestr += "<TR>"
  110.                         writestr += parent.head.listFunc.writeCol(1,<%= L_IPADDRESSCOLWIDTH_NUM %>,"<A HREF='javascript:chgStatus("+i+");'>" + displayVal(parent.head.cachedList[i].ipaddress,"<%= L_ALLUNASSIGNED_TEXT %>") + "</A>","");
  111.                         writestr += parent.head.listFunc.writeCol(1,<%= L_IPPORTCOLWIDTH_NUM %>,displayVal(parent.head.cachedList[i].ipport,"<%= L_NA_TEXT %>"),"");
  112.                         writestr += parent.head.listFunc.writeCol(1,<%= L_SSLPORTCOLWIDTH_NUM %>,displayVal(parent.head.cachedList[i].sslport,"<%= L_NA_TEXT %>"),"");                    
  113.                         writestr += parent.head.listFunc.writeCol(1,<%= L_HOSTCOLWIDTH_NUM %>,parent.head.cachedList[i].host,"");
  114.                         writestr += "</TR>";
  115.             }
  116.         }
  117.         else{
  118.             editOK=true;
  119.                     writestr += "<TR>"
  120.                     writestr += parent.head.listFunc.writeCol(1,<%= L_IPADDRESSCOLWIDTH_NUM %>,"<INPUT NAME='editMe' VALUE='"+parent.head.cachedList[i].ipaddress +"' SIZE=13 <%= Session("DEFINPUTSTYLE") %> onBlur='SetUpdated();'>","");
  121.                     writestr += parent.head.listFunc.writeCol(1,<%= L_IPPORTCOLWIDTH_NUM %>,"<INPUT NAME='ipport' VALUE='"+parent.head.cachedList[i].ipport +"' SIZE=5 <%= Session("DEFINPUTSTYLE") %> onBlur='SetSecure(" + i + ",this,false);SetUpdated();'>","");
  122.                     writestr += parent.head.listFunc.writeCol(1,<%= L_SSLPORTCOLWIDTH_NUM %>,"<INPUT NAME='sslport' VALUE='"+parent.head.cachedList[i].sslport +"' SIZE=5 <%= Session("DEFINPUTSTYLE") %> onBlur='SetSecure(" + i + ",this,true);SetUpdated();'>","");                    
  123.                     writestr += parent.head.listFunc.writeCol(1,<%= L_HOSTCOLWIDTH_NUM %>,"<INPUT NAME='host' VALUE='"+parent.head.cachedList[i].host +"' SIZE=25 <%= Session("DEFINPUTSTYLE") %> onBlur='SetUpdated();'>","");
  124.                     writestr += "</TR>";                
  125.         }
  126.     }
  127.     writestr += "</TABLE>";
  128.     
  129.     return writestr;
  130. }    
  131. function writeLine(str){
  132.     document.write(str);
  133. }
  134. </SCRIPT>
  135. </FORM>
  136. </BODY>
  137. <SCRIPT LANGUAGE="JavaScript">
  138.     if (editOK){
  139.         document.listform.editMe.focus();
  140.         document.listform.editMe.select();
  141.     }
  142. </SCRIPT>
  143.  
  144. </HTML>
  145.  
  146.